package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itheima.service.SetmealGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.SetmealGroupMapper;
import com.itheima.pojo.SetmealGroup;
import org.apache.dubbo.config.annotation.DubboService;

@DubboService
public class SetmealGroupServiceImpl extends ServiceImpl<SetmealGroupMapper, SetmealGroup> implements SetmealGroupService {

    @Override
    public boolean deleteBySetmealId(Long id) {
        QueryWrapper<SetmealGroup> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("setmeal_id",id);
        return remove(queryWrapper);
    }

    @Override
    public Long[] selectBySetmealId(Long setmealId) {
        return this.baseMapper.selectBySetmealId(setmealId);
    }

}